<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card" data-table-id="MenuTable">

    <div class="layui-card-body">

        <div class="layui-form-item">
            <label class="layui-form-label">字段名称</label>
            <div class="layui-input-block">
        		{notempty name='vo.name'}
        		<span class="layui-input layui-bg-gray">{$vo.name|default=""}</span>
        		{else}
                <input name="name" value='{$vo.name|default=""}' required vali-name="字段名称" placeholder="请输入 字段名称" class="layui-input">
                <p class="help-block"><b>必选</b>，请填写 字段名称，小写，下划线连接</p>
        		{/notempty}
            </div>
        </div>
		
        <div class="layui-form-item">
            <label class="layui-form-label">字段注释</label>
            <div class="layui-input-block">
                <input name="comment" value='{$vo.comment|default=""}' required vali-name="字段注释" placeholder="请输入 字段注释" class="layui-input">
                <p class="help-block"><b>必选</b>，请填写 字段注释，简洁扼要</p>
            </div>
        </div>
        
		<div class="layui-form-item">
		    <label class="layui-form-label">字段类型</label>
		    <div class="layui-input-block">
				{notempty name='vo.name'}
		        <span class="layui-input layui-bg-gray">{$vo.type|default=""}</span>
		        <p class="help-block"><b>字段类型请在列表进行修改</b>，当前编辑可修改长度和默认值</p>
				{else}
				<div class="layui-textarea">
					{foreach $fieldTypes as $k => $v}
					{if isset($vo.type) and $vo.type eq $k}
					<input type="radio" lay-filter="type" name="type" value="{$k}" title="{$k}" checked>
					{else}
					<input type="radio" lay-filter="type" name="type" value="{$k}" title="{$k}">
					{/if}
					{/foreach}
				</div>
		        <p class="help-block"><b>必选</b>，请选择合适的字段类型，长度和默认值需在编辑时修改</p>
				{/notempty}
		    </div>
		</div>
		
		{notempty name='vo.name'}
		<div class="layui-form-item">
		    <label class="layui-form-label">字段默认值</label>
		    <div class="layui-input-block">
		        <input name="default" value='{$vo.default|default=""}' vali-name="字段默认值" placeholder="请输入 字段默认值" class="layui-input">
		        <p class="help-block"><b>非必选</b>，请填写 字段默认值</p>
		    </div>
		</div>
		
		<div class="layui-form-item">
		    <label class="layui-form-label">字段长度</label>
		    <div class="layui-input-block">
		        <input name="length" value='{$vo.length|default=""}' vali-name="字段长度" placeholder="请输入 字段长度" class="layui-input">
		        <p class="help-block"><b>非必选</b>，请填写 字段合适的长度</p>
		    </div>
		</div>
		{/notempty}

    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.table_name'}<input type='hidden' value='{$vo.table_name}' name='table_name'>{/notempty}
    {notempty name='vo.name'}<input type='hidden' value='{$vo.name}' name='name'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>{:lang('保存数据')}</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="{:lang('确定要取消吗？')}" data-close>{:lang('取消')}</button>
    </div>
</form>